<template>
    <div class="question-list">
        <h1 class="title">{{item.question.content}}</h1>
        <div class="nums">{{item.question.answerCnt}}个讨论</div>
        <p class="text" v-if="item.answer">{{item.answer.content}}</p>
    </div>
</template>

<script>
export default {
    props:{
        item:Object
    },
}
</script>

<style lang="less" scoped>
.question-list{
    padding: 16px 0;
    margin-left: 16px;
    position: relative;
    font-size: 12px;
    color: #666;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    &::after{
        content: "";
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        border-bottom: 1px solid #eee;
    }

    .title,.nums,.text{
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding-right: 16px;
    }
    
    .title{
        font-weight: 600;
        font-size: 17px;
        color: #333;
    }

    .nums{
        line-height: 30px;
    }

    .text{
        margin-top: 10px;
    }
}
</style>